home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Auge 4000 / Auge 4000 #45 (1990-06-20)(Amiga User Gruppe Einzugsgebiet 4000).zip / Auge 4000 #45 (1990-06-20)(Amiga User Gruppe Einzugsgebiet 4000).adf / ANWENDUNGEN / Ncomm / host / host.script < prev    next >
Text File  |  1990-06-08  |  18KB  |  698 lines

  1. ;*******************************************************
  2. ; NComm HOST SYSTEM
  3. ; Version 1.3 891117
  4. ;
  5. ; Copyright © 1989 Daniel Bloch
  6. ;*******************************************************
  7.  
  8.     set    $version= "1.3"
  9.  
  10. ;--------------------------------------------
  11. ; Set these variables to fit your needs
  12. ;--------------------------------------------
  13.     set    $dir    = "NComm:host/"        ;Directory for misc. files
  14.     set    $uldir    = "NComm:host/files/"    ;Upload directory
  15.     set    $dldir    = "NComm:host/files/"    ;Download directory
  16.     set    $hold    = "NComm:host/hold/"    ;Hold directory
  17.     set    $holdzoo= "t:HOLD.ZOO"        ;Hold file
  18.     set    $tmp    = "t:NHS.tmp"        ;Temporary file
  19.     set    $passwd    = "abc"            ;User password
  20.     set    $sysop    = "Daniel Bloch"    ;Sysop name
  21.     set    $syspass= "xyz"            ;Sysop password
  22.     set    $sysname= "Dan's BBS"        ;Name of system
  23.     set    $list     = "C:list"        ;Directory lister
  24.  
  25. ;All files in hold directory will be deleted at initialization!!!
  26.  
  27. ;-------------------- M A I N   P R O G R A M -----------------------;
  28.     message    "\f"        ;Clear screen
  29. main:    clrstack
  30.     gosub    init        ;Initialize various stuff
  31.     gosub    connect        ;Wait for RING and answer the phone
  32.     when    "\r\nNO CARRIER\r\n" goto NoCarrier
  33.     gosub    prelog        ;Show opening picture
  34.     gosub    login        ;Get name & password
  35.     IF !$name == $sysop THEN goto user
  36.     set     $sysacc = "TRUE"
  37.     IF $pass == $syspass THEN goto OK
  38.     send    "Wrong!!\n"
  39.     write    $dir"log" "\n"$date"  Wrong password: "$pass"\n"
  40.     gosub    logout
  41.     goto    main
  42. user:    set     $sysacc = "FALSE"
  43.     IF $pass == $passwd THEN goto OK
  44.     send    "Wrong!\n"
  45.     write    $dir"log" "\n"$date"  "$name"  Wrong password: "$pass"\n"
  46.     gosub    login
  47.     IF $pass == $passwd THEN goto OK
  48.     send    "Wrong!!\n"
  49.     write    $dir"log" "\n"$date"  "$name"  Wrong password: "$pass"\n"
  50.     gosub    logout
  51.     goto     main
  52.  
  53. ;User has logged in
  54. OK:    write    $dir"log" "\n"$date"  Login: "$name" ("$baud")\n"
  55.     gosub    postlog
  56.     timeout 2
  57.     echo    off
  58.     send    "^[[97x"
  59.     input    $id "\r"
  60.     echo    on
  61.     timeout    300 goto bibi
  62.     send    "\nPress [ENTER] to continue..."
  63.     input    $dummy "\r"
  64.     send    "\f"
  65.     ascsend    $dir"menu0"
  66.     
  67. ;This is the main loop
  68. loop:    gosub    MainMenu
  69.     send    "Are you sure you want to log off the system (Enter=Y)? "
  70.     input    $cmd "\r"
  71.     IF $cmd == "N" THEN goto loop
  72.     send    "\n"
  73.     gosub    logout
  74.     goto    main
  75.  
  76.  
  77.  
  78.  
  79. ;--------------------- S U B R O U T I N E S ----------------------
  80.  
  81.  
  82. ;********************************************************
  83. ;* Initialize the system
  84. ;********************************************************
  85. init:    config    $dir"host.config"
  86.     hangup
  87.     set    $sysacc = "FALSE"
  88.     echo    off
  89.     dwhens
  90.     timeout    0
  91.     cli    "delete >nil: "$hold"#?"
  92.     return
  93.  
  94.  
  95. ;********************************************************
  96. ;* Wait for CONNECT
  97. ;********************************************************
  98. connect:
  99.         dwhens
  100.     send    " \r"
  101.     gosub    skip
  102. conn0:    message    "\n\n\n"$sysname"   [Press '?' for help]\n"
  103.     message    "Waiting for caller...\n"
  104.     timeout 0
  105.     input    $char ""    ;Get one character
  106.     IF !$char == "?" THEN goto conn1
  107.     message "\n\nSpace = Local login (switch your modem off first!)\n"
  108.     message    "    Q = Quit NHS"
  109.     goto    conn0
  110. conn1:    IF $char == "Q" THEN goto QuitNHS
  111.     IF $char == " " THEN goto Local
  112.  
  113. conn2:    when    "CONNECT 1200" goto conn1200
  114.     when    "CONNECT 2400" goto conn2400
  115.     when    "CONNECT 4800" goto conn4800
  116.     when    "CONNECT 9600" goto conn9600
  117.     dtenths    7
  118.     send    "ATA\n"
  119.     timeout 90 goto connect
  120.     wait    "NO CARRIER"
  121.     goto connect
  122.  
  123. conn3:    dwhens
  124.     timeout 0
  125.     echo    on
  126.     gosub    skip
  127.     return
  128.  
  129. Local:    message    "\nStarting local logon..."
  130.     goto     conn3
  131.  
  132. QuitNHS:
  133.     config    "NComm:NComm.config"
  134.     end
  135.  
  136. conn1200:
  137.     set    $baud = "1200"
  138.     goto    conn3
  139. conn2400:
  140.     set    $baud = "2400"
  141.     goto     conn3
  142. conn4800:
  143.     set    $baud = "4800"
  144.     goto    conn3
  145. conn9600:
  146.     set    $baud = "9600"
  147.     goto     conn3
  148.  
  149.  
  150. ;********************************************************
  151. ;* Show "prelog", i.e. the picture to be shown before
  152. ;* login.
  153. ;********************************************************
  154. prelog:    send    "\f"$sysname" ("$baud") up on "$date"\n"
  155.     send    $NComm" / NComm Host System (NHS) v"$version"\n"
  156.     send    "Copyright © 1989 Daniel Bloch\n\n\n"
  157.     ascsend    $dir"prelog"
  158.     return
  159.  
  160.  
  161. ;********************************************************
  162. ;* Show "postlog", i.e. the picture to be shown after
  163. ;* login.
  164. ;********************************************************
  165. postlog:
  166.     send    "\n\n"
  167.     ascsend    $dir"postlog"
  168. ;    cli    "cookie"
  169.     return
  170.  
  171.  
  172. ;********************************************************
  173. ;* Read user name and password into the variables
  174. ;* $name and $pass.  
  175. ;********************************************************
  176. Login:    echo    on
  177.     timeout 120 goto LogSleep
  178.     send    "\n\nEnter your name: "
  179.     input    $name "\r"
  180.     send    "\nEnter your password: "
  181.     echo     off
  182.     input    $pass "\r"
  183.     echo    on
  184.     timeout 0
  185.     send    "\n"
  186.     return
  187. LogSleep:
  188.     send    "\n\nLogin timed out after 2 minutes\n"
  189.     gosub    logout
  190.     goto     main
  191.  
  192. ;********************************************************
  193. ;Skip junk from the modem
  194. ;********************************************************
  195. skip:    timeout 3 goto SkipOK
  196. more:    wait    ""
  197.     goto more
  198. SkipOK:    timeout 0
  199.     return
  200.  
  201.  
  202. ;********************************************************
  203. ;* Log out
  204. ;********************************************************
  205. logout:    send     "\nThanks for calling "$sysname"!\n"
  206.     hangup
  207.     write    $dir"log" $date"  Logout: "$name"\n"
  208.     cli    "delete >nil: "$holdzoo" "$hold"#?"
  209.     return
  210.  
  211. ;********************************************************
  212. ;* User sleeps
  213. ;********************************************************
  214. bibi:    send     "\n\nLooks like you fell asleep!"
  215.     write    $dir"log" $date"  Sleep disconect\n"
  216.     gosub    logout
  217.     goto    main
  218.  
  219. ;********************************************************
  220. ;Main menu
  221. ;********************************************************
  222. MainMenu:
  223.     send    "\nMain Command (? for menu): "
  224.     input    $cmd "\r"
  225.     send    "\n"
  226.     IF $cmd == "?" THEN ascsend $dir"menu0"
  227.     IF $cmd == "G" THEN return
  228.     IF $cmd == "F" THEN gosub FileMenu
  229.     IF $cmd == "B" THEN gosub BullMenu
  230.     IF $cmd == "O" THEN gosub page
  231.     IF $cmd == "S" THEN gosub sysop
  232.     IF $cmd == "C" THEN gosub Comment
  233.     IF $cmd == "R" THEN gosub Read
  234.     IF $cmd == "E" THEN gosub Enter
  235.     IF $cmd == "RE"then gosub Enter
  236.     goto    MainMenu
  237.  
  238.  
  239. ;********************************************************
  240. ;Chat with SYSOP
  241. ;********************************************************
  242. page:    send     "\nPaging SYSOP...\n"
  243.     send    "(Press Ctrl-Z to exit from chat)\n"
  244.     beep
  245.     dtenths 3
  246.     beep
  247.     dtenths 3
  248.     beep
  249.     write    $dir"log" $date"  Paged operator\n"
  250.     when    "^Z" goto EndChat
  251. chat:    input    $dummy    "\r"
  252.     send    "\n"
  253.     goto    chat
  254. EndChat:
  255.     dlwhen
  256.     send     "\n"
  257.     return
  258.  
  259.  
  260. ;********************************************************
  261. ;File menu
  262. ;********************************************************
  263. FileMenu:
  264.     send    "\nFile Command (? for menu): "
  265.     input    $cmd "\r"
  266.     send    "\n"
  267.     IF $cmd == "?" THEN ascsend $dir"menu1"
  268.     IF $cmd == ""  THEN return
  269.     IF $cmd == "Q" THEN return
  270.     IF $cmd == "L" THEN gosub ListFiles
  271.     IF $cmd == "D" THEN gosub Download
  272.     IF $cmd == "U" THEN gosub Upload
  273.     IF $cmd == "V" THEN gosub ViewZOO
  274.     IF $cmd == "EXT" THEN gosub ExtractZOO
  275.     IF $cmd == "ADD" THEN gosub AddFile
  276.     IF $cmd == "DEL" THEN gosub Remove
  277.     IF $cmd == "DIR" THEN gosub Show
  278.     IF $cmd == "GET" THEN gosub GetHold
  279.     goto    FileMenu
  280.  
  281.  
  282. ;********************************************************
  283. ;List files in download directory
  284. ;********************************************************
  285. ListFiles:
  286.     send    "\n"
  287.     cli     $list" "$dldir
  288.     return
  289.  
  290.  
  291. ;********************************************************
  292. ;Download file
  293. ;********************************************************
  294. Download:
  295.     send    "\nEnter file name: "
  296.     input    $file "\r"
  297.     send    "\n"
  298.     IF $file == "" THEN return
  299.     IF exists $dldir$file THEN goto DownlOK
  300.     send    "File '"$file"' not found!\n"
  301.     return
  302. DownlOK:
  303.     send    "Select transfer protocol (X,Y,Z): "
  304.     input    $proto "\r"
  305.     send    "\n"
  306.     IF $proto == "" THEN return
  307.     IF $proto == "X" THEN goto XDownload
  308.     IF $proto == "Y" THEN goto YDownload
  309.     IF $proto == "Z" THEN goto ZDownload
  310.     send    "Illegal protocol!\n"
  311.     goto     DownlOK
  312. XDownload:
  313.     upload    $dldir$file,x
  314.     write    $dir"log" $date"  Downloaded "$file" (Xmodem)\n"
  315.     return
  316. YDownload:
  317.     upload    $dldir$file,y
  318.     write    $dir"log" $date"  Downloaded "$file" (Ymodem)\n"
  319.     return
  320. ZDownload:
  321.     upload    $dldir$file,z
  322.     write    $dir"log" $date"  Downloaded "$file" (Zmodem)\n"
  323.     return
  324.  
  325.  
  326. ;********************************************************
  327. ;Upload file
  328. ;********************************************************
  329. Upload:
  330.     send    "\nEnter file name: "
  331.     input    $file "\r"
  332.     send    "\n"
  333.     IF $file == "" THEN return
  334.     IF !exists $uldir$file THEN goto UploadOK
  335.     send    "File '"$file"' already exist!\n"
  336.     return
  337. UploadOK:
  338.     send    "Enter description of file (Enter=none): "
  339.     input    $desc "\r"
  340.     send    "\n"
  341. GetProto:
  342.     send    "Select transfer protocol (X,Y,Z): "
  343.     input    $proto "\r"
  344.     send    "\n"
  345.     IF $proto == "" THEN return
  346.     IF $proto == "X" THEN goto XUpload
  347.     IF $proto == "Y" THEN goto YUpload
  348.     IF $proto == "Z" THEN goto ZUpload
  349.     send    "Illegal protocol!\n"
  350.     goto     GetProto
  351. XUpload:
  352.     download $uldir$file,x
  353.     write    $dir"log" $date"  Uploaded "$file" (Xmodem)\n"
  354.     IF !$desc == "" THEN cli "Filenote "$uldir$file" \""$desc"\""
  355.     return
  356. YUpload:
  357.     download $uldir$file,y
  358.     write    $dir"log" $date"  Uploaded "$file" (Ymodem)\n"
  359.     IF !$desc == "" THEN cli "Filenote "$uldir$file" \""$desc"\""
  360.     return
  361. ZUpload:
  362.     download $uldir$file,z
  363.     write    $dir"log" $date"  Uploaded "$file" (Zmodem)\n"
  364.     IF !$desc == "" THEN cli "Filenote "$uldir$file" \""$desc"\""
  365.     return
  366.  
  367.  
  368. ;********************************************************
  369. ;Bulletin menu
  370. ;********************************************************
  371. BullMenu:
  372.     ascsend    $dir"menu2"
  373. bull:    send    "\nBulletin number (? for menu): "
  374.     input    $cmd "\r"
  375.     send    "\n"
  376.     IF $cmd == "?"  THEN goto BullMenu
  377.     IF $cmd == ""   THEN return
  378.     IF $cmd == "Q"  THEN return
  379.     IF exists $dir"bull"$cmd THEN goto ShowBull
  380.     send    "Illegal bulletin number!\n"
  381.     goto    bull
  382. ShowBull:
  383.     send    "\n"
  384.     ascsend    $dir"bull"$cmd
  385.     write    $dir"log" $date"  Read bulletin #"$cmd"\n"
  386.     goto    bull
  387.  
  388.  
  389. ;********************************************************
  390. ;Sysop menu
  391. ;********************************************************
  392. Sysop:
  393.     IF $sysacc == "TRUE" THEN goto SysOK
  394.     send    "You are not allowed to do that!\n"
  395.     write    $dir"log" $date"  Attempted restricted command\n"
  396.     return
  397. SysOK:    send    "\nSysop Command (? for menu): "
  398.     input    $cmd "\r"
  399.     send    "\n"
  400.     IF $cmd == "?" THEN ascsend $dir"menu3"
  401.     IF $cmd == "Q" THEN return
  402.     IF $cmd == ""  THEN return
  403.     IF $cmd == "L" THEN gosub ListLog
  404.     IF $cmd == "P" THEN gosub ChangePass
  405.     IF $cmd == "S" THEN gosub ChangeSys
  406.     IF $cmd == "E" THEN gosub ExecDOS
  407.     IF $cmd == "R" THEN gosub Priv
  408.     IF $cmd == "D" THEN gosub DeleteLog
  409.     IF $cmd == "M" THEN gosub DeleteMess
  410.     IF $cmd == "C" THEN gosub DeleteComm
  411.     goto    sysop
  412.  
  413.  
  414. ;********************************************************
  415. ;Delete log file
  416. ;********************************************************
  417. DeleteLog:
  418.     send    "\nAre you sure (Enter=N)? "
  419.     input    $cmd "\r"
  420.     send    "\n"
  421.     IF !$cmd == "Y" THEN return
  422.     cli    "delete "$dir"log"
  423.     write    $dir"log" $date"  Started new log\n"
  424.     return
  425.  
  426.  
  427. ;********************************************************
  428. ;Delete Public messages
  429. ;********************************************************
  430. DeleteMess:
  431.     send    "\nDelete all public messages (Enter=N)? "
  432.     input    $cmd "\r"
  433.     send    "\n"
  434.     IF !$cmd == "Y" then return
  435.     cli "delete >nil: "$dir"Messages"
  436.     write    $dir"log" $date"  Public messages deleted\n"
  437.     return
  438.  
  439.  
  440. ;********************************************************
  441. ;Delete private messages
  442. ;********************************************************
  443. DeleteComm:
  444.     send    "\nDelete all private messages (Enter=N)? "
  445.     input    $cmd "\r"
  446.     send    "\n"
  447.     IF !$cmd == "Y" then return
  448.     cli "delete >nil: "$dir"Comments"
  449.     write    $dir"log" $date"  Private messages deleted\n"
  450.     return
  451.  
  452.  
  453. ;********************************************************
  454. ;List log file
  455. ;********************************************************
  456. ListLog:
  457.     send    "\n"
  458.     ascsend    $dir"log"
  459.     return
  460.  
  461.  
  462. ;********************************************************
  463. ;Change user password
  464. ;********************************************************
  465. ChangePass:
  466.     send     "\nEnter new user password: "
  467.     input    $passwd    "\r"
  468.     send    "\n\nUser password changed to '"$passwd"'.\n"
  469.     send    "WARNING: Password changes are lost when the NHS script "
  470.     send    "is stopped.\n"
  471.     send    "Edit the file host.script to make changes permanent.\n"
  472.     write    $dir"log" $date"  User password changed to '"$passwd"'.\n"
  473.     return
  474.  
  475.  
  476. ;********************************************************
  477. ;Change Sysop password
  478. ;********************************************************
  479. ChangeSys:
  480.     send    "\nEnter old SYSOP password: "
  481.     input    $pass "\r"
  482.     send    "\n"
  483.     IF $pass == $syspass then goto ChangeOK
  484.     send "Wrong!\n"
  485.     return
  486. ChangeOK:
  487.     send     "Enter new SYSOP password: "
  488.     input    $syspass "\r"
  489.     send    "\n\nSYSOP password changed to '"$syspass"'.\n"
  490.     write    $dir"log" $date"  SYSOP password changed to '"$syspass"'.\n"
  491.     send    "WARNING: Password changes are lost when the NHS script "
  492.     send    "is stopped.\n"
  493.     send    "Edit the file host.script to make changes permanent.\n"
  494.     return
  495.  
  496.  
  497. ;********************************************************
  498. ;Execute DOS command
  499. ;********************************************************
  500. ExecDOS:
  501.     send    "\nEnter DOS command to execute: "
  502.     input    $cmd "\r"
  503.     send    "\n"
  504.     write    $dir"log" $date"  Executed DOS command: "$cmd"\n"
  505.     cli    $cmd
  506.     return
  507.     
  508.  
  509. ;********************************************************
  510. ;Comment to sysop
  511. ;********************************************************
  512. Comment:
  513.     send    "\n\nSubject: "
  514.     input    $subject "\r"
  515.     IF $subject == "" then return
  516.     set    $header = "\n\nFrom: "$name"\nSubject: "$subject"\n"
  517.     set    $header = $header"Date: "$date"\n"
  518.     set    $header = $header"------------------------------\n"
  519.     write    $dir"Comments" $header
  520.     send    $header
  521.     send    "[Enter your message below; "
  522.     send    "end with Ctrl-Z on a separate line]\n\n"
  523.     when    "^Z" goto EndCom
  524. com:    input    $line "\r"
  525.     send    "\n"
  526.     write    $dir"Comments" $line"\n"
  527.     goto     com
  528. EndCom:    dlwhen
  529.     send    "\nMessage entered!^G\n"
  530.     write    $dir"log" $date"  Entered comment to SYSOP\n"
  531.     return
  532.  
  533.     
  534. ;********************************************************
  535. ;Enter message
  536. ;********************************************************
  537. Enter:
  538.     send    "\nTo (Enter=ALL): "
  539.     input    $to "\r"
  540.     IF $to == "" then set $to = "ALL"
  541.     send    "\nSubject: "
  542.     input    $subject "\r"
  543.     IF $subject == "" then return
  544.     set    $header = "\n\nFrom: "$name"\n"
  545.     set    $header = $header"To: "$to"\nSubject: "$subject"\n"
  546.     set    $header = $header"Date: "$date"\n"
  547.     set    $header = $header"------------------------------\n"
  548.     write    $dir"messages" $header
  549.     send    $header
  550.     send    "[Enter your message below; "
  551.     send    "end with Ctrl-Z on a separate line]\n\n"
  552.     when    "^Z" goto EndEnt
  553. ent:    input    $line "\r"
  554.     send    "\n"
  555.     write    $dir"messages" $line"\n"
  556.     goto     ent
  557. EndEnt:    dlwhen
  558.     send    "\nMessage entered!^G\n"
  559.     write    $dir"log" $date"  Entered message\n"
  560.     return
  561.  
  562.  
  563. ;********************************************************
  564. ;Read public messages
  565. ;********************************************************
  566. Read:    IF !exists $dir"messages" then return
  567.     ascsend    $dir"messages"
  568.     return
  569.  
  570.  
  571. ;********************************************************
  572. ;Read private messages
  573. ;********************************************************
  574. Priv:    IF !exists $dir"comments" then return
  575.     ascsend    $dir"comments"
  576.     return
  577.  
  578. ;********************************************************
  579. ;Handle NO CARRIER
  580. ;********************************************************
  581. NoCarrier:
  582.     write    $dir"log" $date"  CARRIER LOST\n"
  583.     gosub    logout
  584.     goto     main
  585.  
  586.  
  587. ;********************************************************
  588. ;View ZOO file
  589. ;********************************************************
  590. ViewZOO:
  591.     send    "\nEnter name of .ZOO file: "
  592.     input    $file "\r"
  593.     send    "\n"
  594.     IF $file == "" then return
  595.     IF exists $dldir$file then goto ViewOK
  596.     IF exists $dldir$file".ZOO" then goto ViewOK
  597.     send    "File not found!\n"
  598.     return
  599. ViewOK:    write    $dir"log" $date"  ZOO view of "$file"\n"
  600.     cli    "zoo v "$dldir$file
  601.     return
  602.  
  603.  
  604. ;********************************************************
  605. ;Extract ZOO file
  606. ;********************************************************
  607. ExtractZOO:
  608.     send    "\nEnter name of .ZOO file: "
  609.     input    $file "\r"
  610.     send    "\n"
  611.     IF $file == "" then return
  612.     IF exists $dldir$file then goto ExtOK
  613.     IF exists $dldir$file".ZOO" then goto ExtOK
  614.     send    "File not found!\n"
  615.     return
  616. ExtOK:    send    "\nEnter name(s) of file(s) to extract [Enter=all]: "
  617.     input    $files "\r"
  618.     write    $dir"log" $date"  Extracted "$file" "$files"\n"
  619.     send    "\n"
  620.     cli    "delete >nil: "$tmp
  621.     write    $tmp "CD "$hold"\n"
  622.     write    $tmp "zoo xO "$dldir$file" "$files"\n"
  623.     cli    "execute "$tmp
  624.     return
  625.  
  626.  
  627. ;********************************************************
  628. ;Add file to HOLD
  629. ;********************************************************
  630. AddFile:
  631.     send    "\nEnter file name: "
  632.     input    $file "\r"
  633.     send    "\n"
  634.     IF $file == "" then return
  635.     IF exists $dldir$file then goto AddOK
  636.     send    "File '"$file"' not found!\n"
  637.     return
  638. AddOK:    cli    "COPY "$dldir$file" "$hold
  639.     write    $dir"log" $date"  Added "$file"\n"
  640.     return
  641.     
  642.  
  643. ;********************************************************
  644. ;Delete file(s) from HOLD
  645. ;********************************************************
  646. Remove:    send    "\nEnter file name: "
  647.     input    $file "\r"
  648.     send    "\n"
  649.     IF $file == "" then return
  650.     write    $dir"log" $date"  Deleted "$file"\n"
  651.     cli    "delete \""$hold$file"\""
  652.     return
  653.  
  654.  
  655. ;********************************************************
  656. ;List files in HOLD directory
  657. ;********************************************************
  658. Show:
  659.     send    "\n"
  660.     cli     $list" "$hold
  661.     return
  662.  
  663.  
  664. ;********************************************************
  665. ;Download files in HOLD directory
  666. ;********************************************************
  667. GetHold:
  668.     send    "One moment while I pack the file...\n"
  669.     cli    "delete >nil: "$holdzoo
  670.     cli    "zoo a "$holdzoo" "$hold"*"
  671. GetPr:
  672.     send    "Select transfer protocol (X,Y,Z): "
  673.     input    $proto "\r"
  674.     send    "\n"
  675.     IF !$proto == "" then goto Get1
  676.     cli    "delete >nil: "$holdzoo
  677.     return
  678. Get1:    IF $proto == "X" then goto XGet
  679.     IF $proto == "Y" then goto YGet
  680.     IF $proto == "Z" then goto ZGet
  681.     send    "Illegal protocol!\n"
  682.     goto     GetPr
  683. XGet:
  684.     upload    $holdzoo,x
  685.     write    $dir"log" $date"  Downloaded HOLD.ZOO (Xmodem)\n"
  686.     cli    "delete >nil: "$holdzoo
  687.     return
  688. YGet:
  689.     upload    $holdzoo,y
  690.     write    $dir"log" $date"  Downloaded HOLD.ZOO (Ymodem)\n"
  691.     cli    "delete >nil: "$holdzoo
  692.     return
  693. ZGet:
  694.     upload    $holdzoo,z
  695.     write    $dir"log" $date"  Downloaded HOLD.ZOO (Zmodem)\n"
  696.     cli    "delete >nil: "$holdzoo
  697.     return
  698.